Skip to content

Commit 31fd3d9

Browse files
committed
Updates from technical reviewer
1 parent 97dec94 commit 31fd3d9

File tree

1 file changed

+18
-6
lines changed
  • files/en-us/web/api/web_authentication_api/webauthn_extensions

1 file changed

+18
-6
lines changed

files/en-us/web/api/web_authentication_api/webauthn_extensions/index.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,9 @@ For example, the definition below might be used when creating a new credential i
442442
});
443443
```
444444

445-
The optional `second` property can be used if two random values need to be created for a credential.
446-
For example, this might be used in workflows where the encryption key is rotated on each session.
445+
The optional `second` property can be used if two random values need to be created for a credential, such as in workflow where the encryption key is rotated on each session.
446+
As an example of such a workflow, in each session you pass two salts: the `first` salt returns a value that can be used to decrypt the previous session data, while the `second` salt returns a value that can be used to encrypt this session data.
447+
In subsequent sessions the `second` salt is moved to the position of the `first` salt, so the lifetime where a particular salt can be usefully compromised is bounded.
447448

448449
```js
449450
{
@@ -490,7 +491,6 @@ The `get()` call may reject with the following exceptions:
490491
#### Output
491492

492493
A successful `create()` call provides the following extension output if the registered credential supports using the PRF when creating credentials.
493-
Note that `enabled` is only present as an output for `create()`, and that `first` and `second` contain the result of evaluating `first` and `second` on the input.
494494

495495
```js
496496
{
@@ -501,7 +501,10 @@ Note that `enabled` is only present as an output for `create()`, and that `first
501501
};
502502
```
503503

504-
If the authenticator doesn't support using the PRF on creation, the output will look like this:
504+
The `enabled` property indicates whether the PRF can be used when creating credentials.
505+
The `first` and `second` properties contain the result of evaluating `first` and `second` on the input, and `second` will be omitted if the corresponding input was not specified.
506+
507+
If the authenticator doesn't support using the PRF on creation, the output on `create()` will look like this:
505508

506509
```js
507510
{
@@ -511,8 +514,8 @@ If the authenticator doesn't support using the PRF on creation, the output will
511514
};
512515
```
513516

514-
A `get()` returns a `prf` object that does not include the `enabled` key.
515-
The values are otherwise as for the create call.
517+
A `get()` returns a same `prf` object with the same structure as `create()`, except that it omits the `enabled` key.
518+
The object contains PRF values that correspond to the inputs for the credential that was selected by the user.
516519

517520
```js
518521
{
@@ -522,6 +525,15 @@ The values are otherwise as for the create call.
522525
};
523526
```
524527

528+
Note that `enabled` is only present as an output for `create()`, and indicates if PRF is supported by the authenticator when a credential is created.
529+
If the authenticator doesn't support PRF at all, the result for the `get()` call will be:
530+
531+
```js
532+
{
533+
prf: {},
534+
};
535+
```
536+
525537
## Specifications
526538

527539
There are a number of places that WebAuthn extensions are specified. IANA's [WebAuthn Extension Identifiers](https://www.iana.org/assignments/webauthn/webauthn.xhtml#webauthn-extension-ids) provides a registry of all extensions, but bear in mind that some may be deprecated.

0 commit comments

Comments
 (0)